home *** CD-ROM | disk | FTP | other *** search
- Path: newsstand.tc.umn.edu!thornley
- From: thornley@cs.umn.edu (David H. Thornley)
- Newsgroups: comp.lang.c
- Subject: Re: What to do when feof() is NOT feof()
- Date: 19 Feb 1996 22:27:47 GMT
- Organization: University of Minnesota
- Message-ID: <4gath3$abv@epx.cis.umn.edu>
- References: <824554814snz@metsys.demon.co.uk> <4g4vpp$52f@spectator.cris.com> <danpop.824614833@rscernix> <4g7t1r$71s@crl13.crl.com>
- NNTP-Posting-Host: micro.cs.umn.edu
-
- In article <4g7t1r$71s@crl13.crl.com>, James Aragon <aragon@crl.com> wrote:
- >Dan Pop (danpop@mail.cern.ch) wrote:
- >> In <4g4vpp$52f@spectator.cris.com> aubrey@concentric.net (Aubrey Harrison) writes:
- >
- >> >I think if you open the file in "text" mode the end of the file is indicated by
- >> >the EOF marker (ASCII 26 I believe). To avoid this you must open the file in
- >> >binary mode.
- >
- >> Once again: ignorants and idiots are kindly asked to refrain from posting
- >> their thoughts and beliefs to this newsgroup.
- >
- >> If you don't KNOW what you're talking about, just keep your "mouth" shut.
- >> This is comp.lang.c, not talk.rumors.
- >
- >No wonder so many consider comp.lang.c to be such a hostile place. Can't
- >someone be corrected--and educated--without referring to "ignorants and
- >idiots."
- >
- If you've noticed, Dan Pop *never* refers to somebody asking a question
- in this manner, only people who post ridiculous answers. If you ask a
- dumb question, the worst that will happen is that you will be politely
- asked to post to the appropriate newsgroup (where you've got a better
- chance of getting the right answer, anwyay). If you post ignorant
- statements (and the one Dan referred to is ignorant), you may be
- misinforming thousands of people.
-
- >Sometimes it seems like this newsgroup suffers less from posters who are
- >technically ignorants and idiots than from those who are socially
- >ignorants and idiots.
- >
- Sometimes it seems like one of the big problems with this newsgroup is the
- people who assume that their system, experience, and misconceptions are
- as mcuh the truth as K&R2. There is no shame in technical ignorance,
- but there is in misleading others, either because one is malicious or
- because one simply doesn't bother to learn something before trying to
- teach it. Dan, among others, puts in a lot of time answering questions
- correctly, and I'm willing to cut him much more slack than somebody
- who posts nonsense.
-
- Ob[ligatory, not fuscated]C: I'd get real frustrated with a system
- that triggered feof() early in the file, and I'd try to see why from
- the documentation and any technical support. I'd also consider a
- competitor's product. Anyway, I rarely use feof(), preferring to
- use getc(), fgets(), fread(), whatever, and check the return values.
- This usually feels more natural than being told whether or not I've
- tried to read past the end of file. (Now, if feof() would tell me
- that I'm *going* to read past EOF, I'd find it a bit more useful.)
-
- --
- David H. Thornley, known to the Wise as thornley@cs.umn.edu
- Disclaimer: These are not the opinions of the University of Minnesota,
- its Regents, faculty, staff, students, or squirrels.
- Datclaimer: Well, maybe the squirrels. They're pretty smart.
-